/*
 * @Description  :
 * @Version      : 1.0
 * @Author       : Shiming
 * @Date         : 2022-05-09 10:49:35
 * @LastEditors  : Shiming
 * @LastEditTime : 2022-05-11 14:47:57
 * @FilePath     : \\tms-obc-web\\src\\app\\routes\\partner\\partner-list\\components\\channel-log-modal\\channel-log-modal.component.ts
 * Copyright (C) 2022 huzhenhong. All rights reserved.
 */
import { Component, OnInit, ViewChild } from '@angular/core';
import { STColumn, STComponent } from '@delon/abc/st';
import { PartnerListService } from '../../services/partner-list.service';

@Component({
  selector: 'app-channel-log-modal',
  styleUrls: ['./channel-log-modal.component.less'],
  templateUrl: './channel-log-modal.component.html'
})
export class ChannelLogModalComponent implements OnInit {
  @ViewChild('changeST', { static: true }) changeST!: STComponent;
  @ViewChild('noChangeST', { static: true }) noChangeST!: STComponent;
  columns: { changeColumn: STColumn[]; beChangeColumn: STColumn[] } = this.initST();
  id = '';
  constructor(public service: PartnerListService) {}

  ngOnInit(): void {
    console.log(this.changeST);
    
  }

  private initST(): { changeColumn: STColumn[]; beChangeColumn: STColumn[] } {
    return {
      changeColumn: [
        { title: '客户名称', index: 'enterpriseName', width: 180 },
        { title: '合伙人', index: 'newPartnerName', width: 160 },
        { title: '渠道销售', index: 'newChannelName', className: 'text-center', width: 130 },
        { title: 'CRM审核状态', render: 'crmStatus', width: 150 },
        { title: '生效时间', index: 'effectiveTime', className: 'text-center', width: 130 }
      ],
      beChangeColumn: [
        { title: '客户名称', index: 'enterpriseName', width: 180 },
        { title: '合伙人', index: 'newPartnerName', width: 160 },
        { title: '渠道销售', index: 'newChannelName', className: 'text-center', width: 130 },
        { title: '生效时间', index: 'effectiveTime', className: 'text-center', width: 130 }
      ]
    };
  }
}
